home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / gfx / show / svoUtah22.lha / svoUtahRLE / source / URT / lib / rle_global.c < prev    next >
C/C++ Source or Header  |  1992-07-13  |  3KB  |  95 lines

  1. /*
  2.  * This software is copyrighted as noted below.  It may be freely copied,
  3.  * modified, and redistributed, provided that the copyright notice is 
  4.  * preserved on all copies.
  5.  * 
  6.  * There is no warranty or other guarantee of fitness for this software,
  7.  * it is provided solely "as is".  Bug reports or fixes may be sent
  8.  * to the author, who may or may not act on them as he desires.
  9.  *
  10.  * You may not include this software in a program or other software product
  11.  * without supplying the source, or without informing the end-user that the 
  12.  * source is available for no extra charge.
  13.  *
  14.  * If you modify this software, you should include a notice giving the
  15.  * name of the person performing the modification, the date of modification,
  16.  * and the reason for such modification.
  17.  *
  18.  *  Modified at BRL 16-May-88 by Mike Muuss to avoid Alliant STDC desire
  19.  *  to have all "void" functions so declared.
  20.  */
  21. /* 
  22.  * rle_global.c - Global variable initialization for rle routines.
  23.  * 
  24.  * Author:    Spencer W. Thomas
  25.  *         Computer Science Dept.
  26.  *         University of Utah
  27.  * Date:    Thu Apr 25 1985
  28.  * Copyright (c) 1985,1986 Spencer W. Thomas
  29.  * 
  30.  * $Id: rle_global.c,v 3.0 90/08/03 15:20:54 spencer Exp $
  31.  */
  32.  
  33. #include <stdio.h>
  34. #include <rle_put.h>
  35. #include <rle.h>
  36.  
  37. extern int    RunSetup( ARB_ARGS ),
  38.         RunSkipBlankLines( ARB_ARGS ),
  39.         RunSetColor( ARB_ARGS ),
  40.         RunSkipPixels( ARB_ARGS ),
  41.         RunNewScanLine( ARB_ARGS ),
  42.         Runputdata( ARB_ARGS ),
  43.         Runputrun( ARB_ARGS ),
  44.         RunputEof( ARB_ARGS );
  45.  
  46. extern int    DefaultBlockHook( ARB_ARGS );
  47. extern void    NullputEof( ARB_ARGS );
  48.  
  49. struct rle_dispatch_tab rle_DTable[] = {
  50.     {
  51.     " OB",
  52.     RunSetup,
  53.     RunSkipBlankLines,
  54.     RunSetColor,
  55.     RunSkipPixels,
  56.     RunNewScanLine,
  57.     Runputdata,
  58.     Runputrun,
  59.     DefaultBlockHook,
  60.     RunputEof
  61.     },
  62. };
  63.  
  64. static int bg_color[3] = { 0, 0, 0 };
  65.  
  66. rle_hdr rle_dflt_hdr = {
  67.     RUN_DISPATCH,        /* dispatch value */
  68.     3,                /* 3 colors */
  69.     bg_color,            /* background color */
  70.     0,                /* (alpha) if 1, save alpha channel */
  71.     2,                /* (background) 0->just save pixels, */
  72.                 /* 1->overlay, 2->clear to bg first */
  73.     0, 511,            /* (xmin, xmax) X bounds to save */
  74.     0, 511,            /* (ymin, ymax) Y bounds to save */
  75.     0,                /* ncmap (if != 0, save color map) */
  76.     8,                /* cmaplen (log2 of length of color map) */
  77.     NULL,            /* pointer to color map */
  78.     NULL,            /* pointer to comment strings */
  79. #if defined(AMIGA) && defined(__GNUC__)
  80.     NULL,
  81. #else
  82.     stdout,            /* output file */
  83. #endif
  84.     { 7 }            /* RGB channels only */
  85.     /* Can't initialize the union */
  86. };
  87.  
  88. /* ARGSUSED */
  89. void
  90. NullputEof(the_hdr)
  91. rle_hdr * the_hdr;
  92. {
  93.                 /* do nothing */
  94. }
  95.